package com.fjec.market.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjec.common.protocol.JsonResult;

import java.util.List;
import java.util.Map;

public interface IShopService {

    /**
     * 获取用户信息
     *
     * @return
     */
    JsonResult getShopPhone();

    /**
     * 修改用户电话
     *
     * @param newPhone
     * @param verifyCode
     * @return
     */
    JsonResult updateShopPhone(String newPhone, String verifyCode);

    /**
     * 修改是否允许打电话
     *
     * @param allowPhone
     * @return
     */
    JsonResult updateShopAllowPhone(Integer allowPhone);

    /**
     * 判断商铺是否完善信息，用商铺头像判断，头像为空则未完善信息
     *
     * @return
     */
    boolean checkSuccessInfo();

    /**
     * 首页显示按钮
     *
     * @return
     */
    JsonResult mainButtonDisplay();

    /**
     * 获取果农的评分
     *
     * @return
     */
    List<Map<String, Object>> getFarmerShopStar();

    /**
     * 获取分拣、农资、包装的评分
     *
     * @return
     */
    List<Map<String, Object>> getBusinessShopStar();

    /**
     * 获取采购商的评分
     *
     * @return
     */
    List<Map<String, Object>> getPurchaseShopStar();

    List<Map<String, Object>> getDepoInfoByConditions(Integer searchBy, String title, Integer busiType, Integer markCode, Integer depoStatus, Integer timedBy, String startTime, String endTime, Page page);

    Long getTotalDepoByConditions(Integer searchBy, String title, Integer busiType, Integer markCode, Integer depoStatus, Integer timedBy, String startTime, String endTime);

    Map<String, Object> getAll4Status();

    /**
     * 根据userId查询店铺进件状态
     * RegStatus 进件状态
     * 0=未注册商铺
     * 1=基本信息
     * 2=已完善信息
     * 3=已进件
     * <p>
     * DepoStatus 保证金状态
     * 0=未缴纳
     * 1=已缴纳
     * 2=申请退回
     * 3=已退回
     *
     * @param userId
     * @return
     */
    Map<String, Object> getShopRegStatusByUserId(Long userId);

    int refundDeposit(Long busiId, Integer busiType);

    int applyRefundDeposit();
}
